home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 1 / Amiga Tools.iso / egs-tools / egs_demo-version / egs_devels / examples / egs_menu / global.h < prev    next >
C/C++ Source or Header  |  1994-06-06  |  4KB  |  200 lines

  1. /*
  2. ** Author: Markus van Kempen
  3. **
  4. ** Global variables & structures
  5. **
  6. **
  7. ** (c) by VIONA-Development 1992/93
  8. */
  9.  
  10. /* See Window structure below */
  11.  
  12. #define   WIN_LEFT      100     /* left border of window*/
  13. #define   WIN_TOP       100     /* top edge of window */
  14.  
  15. #define   WIN_HEIGHT    120     /* ... */
  16. #define   WIN_WIDTH     220     /* ... */
  17.  
  18. #define   WIN_MINHEIGHT 120     /* MinHeight */
  19. #define   WIN_MINWIDTH  220     /* MinWidth  */
  20.  
  21.  
  22. /*
  23. **  Variables
  24. */
  25.  
  26. int             dummy;
  27. EI_MenuPtr      Menu;           /* used in main.c InitMenu.c */
  28. EG_EFontPtr     FontforMenu;
  29. struct EI_Window *Window;
  30. ER_SimpleRequestPtr ErrorReq;
  31.  
  32. struct OpenStructTyp
  33. {
  34.     ULONG          *Ort;
  35.     char           *Name;
  36.     ULONG           Version;
  37. };
  38.  
  39. /*
  40.  * The EGS lib bases
  41.  *
  42.  */
  43.  
  44. struct Library *EGSBase;
  45. struct Library *EGSBlitBase;
  46. struct Library *EGSLayersBase;
  47. struct Library *EGSGfxBase;
  48. struct Library *EGSIntuiBase;
  49. struct Library *EGSRequestBase;
  50. struct Library *EGBBase;
  51. struct Library *EGBMenuSelectBase;
  52. struct Library *EGBRadioBase;
  53. struct Library *EGBScrollBase;
  54. struct Library *EGBSelectBase;
  55. struct Library *EGBSetBase;
  56. struct Library *EGBTextInfoBase;
  57.  
  58. /********************************************/
  59.  
  60. struct OpenStructTyp OpenStruct[] =
  61. {
  62.     {(ULONG *) & EGSBase, "egs.library", 0},
  63.     {(ULONG *) & EGSBlitBase, "egsblit.library", 0},
  64.     {(ULONG *) & EGSLayersBase, "egslayers.library", 0},
  65.     {(ULONG *) & EGSGfxBase, "egsgfx.library", 0},
  66.     {(ULONG *) & EGSIntuiBase, "egsintui.library", 0},
  67.     {(ULONG *) & EGBBase, "egsgadbox.library", 0},
  68.     {(ULONG *) & EGSRequestBase, "egsrequest.library", 0},
  69.     {(ULONG *) & EGBMenuSelectBase, "egb/gbmenuselect.library", 0},
  70.     {(ULONG *) & EGBRadioBase, "egb/gbradio.library", 0},
  71.     {(ULONG *) & EGBScrollBase, "egb/gbscrollbox.library", 0},
  72.     {(ULONG *) & EGBSelectBase, "egb/gbselect.library", 0},
  73.     {(ULONG *) & EGBSetBase, "egb/gbsets.library", 0},
  74.     {(ULONG *) & EGBTextInfoBase, "egb/gbtextinfo.library", 0},
  75.     {0L, 0L, 0L}
  76. };
  77.  
  78. struct EI_NewWindow newwin =
  79. {
  80.     WIN_LEFT,                   /* left border of window*/
  81.     WIN_TOP,                    /* top edge of window */
  82.  
  83.     WIN_WIDTH,                  /* ... */
  84.     WIN_HEIGHT,                 /* ... */
  85.  
  86.     WIN_MINWIDTH,               /* MinWidth  */
  87.     WIN_MINHEIGHT,              /* MinHeight */
  88.     800,                        /* MaxWidth  */
  89.     600,                        /* MaxHeight */
  90.     NULL,                       /* Screen    */
  91. /* sysGadget */
  92.  
  93.     EI_WINDOWDRAG |
  94.     EI_WINDOWCLOSE | EI_WINDOWSIZE |
  95.     EI_WINDOWFRONT | EI_WINDOWBACK,
  96. /*
  97. EI_WINDOWFLIP
  98. EI_WINDOWBIG
  99. EI_WINDOWSMALL
  100. EI_WINDOWICON
  101. EI_WINDOWARROWL
  102. EI_WINDOWARROWR
  103. EI_WINDOWARROWU
  104. EI_WINDOWARROWD
  105. EI_WINDOWSCROLLH
  106. EI_WINDOWSCROLLV
  107. EI_WINDOWDRAG
  108. */
  109.  
  110.     NULL,                       /* EI_GadgetPtr -> gadgets   */
  111. /* FirstGadget */
  112.     "Titel",                    /* Titel                     */
  113.  
  114. /* Flags  */
  115.  
  116.     EI_WINDOWACTIVE |
  117.     EI_WINDOW_MENULOCAL |
  118.     EI_FRONTBACKGADGET |
  119.     EI_WINDOWCENTER |
  120.     EI_SIMPLE_REFRESH |
  121.     EI_GIMMEZEROZERO |
  122.     EI_SIZEBRIGHT,
  123.  
  124.  
  125. /* Corresponding EI_WindowFlagSet has 32 bits ! */
  126.  
  127. /*
  128.  
  129. EI_GIMMEZEROZERO
  130. EI_BORDERLESS
  131. EI_SUPER_BITMAP
  132. EI_SIMPLE_REFRESH
  133. EI_WINDOWREFRESH
  134. EI_WINDOWACTIVE
  135. EI_WINDOW_MENULOCAL
  136. EI_OWN_IDCMPPORT
  137. EI_OWN_COLORPALETTE
  138. EI_FRONTBACKGADGET
  139. EI_RMBTRAP
  140. EI_REPROTMOUSE
  141. EI_BACKDROP
  142. EI_SMART_REFRESH
  143. EI_WINDOW_MENUPOPUP
  144. EI_SIZEBBOTTOM
  145. EI_SIZEBRIGHT
  146. EI_WINDOW_USERSTYLE
  147. EI_ACTIVETOFRONT
  148. EI_QUICKSCROLL
  149. EI_WINDOW_SLEEPING
  150. EI_FIXWINDOW_RATIO
  151. EI_FORCE_TO_SCREEN
  152. EI_WINDOWCENTER
  153. EI_SEND_OUTSIDEMOVES
  154. */
  155.  
  156. /* IDCMP -Flags */
  157.     EI_iCLOSEWINDOW |
  158.     EI_iMOVEWINDOW |
  159.     EI_iSIZEVERIFY |
  160.     EI_iNEWSIZE |
  161.     EI_iMENUPICK,
  162.  
  163.  
  164. /* Corresponding EI_EIDCMPFlagSet has 32 bits ! */
  165. /*
  166.  
  167. EI_iMOUSEBOTTONS
  168. EI_iMOUSEMOVE
  169. EI_iRAWKEY
  170. EI_iACTIVEWINDOW
  171. EI_iREFRESHWINDOW
  172. EI_iCLOSEWINDOW
  173. EI_iNEWSIZE
  174. EI_iGADGETDOWN
  175. EI_iGADGETUP
  176. EI_iMENUVERIFY
  177. EI_iVANILLAKEY
  178. EI_iSIZEVERIFY
  179. EI_iINACTIVEWINDOW
  180. EI_iINTUITICKS
  181. EI_iDISKINSERT
  182. EI_iDISKREMOVE
  183. EI_iNEWPREFS
  184. */
  185.  
  186.     NULL,                       /* MsgPort *p    */
  187. /* Windowcolors  */
  188.     {3, 1, 0, 2, 1, 3, 1},      /* WinColors     */
  189.     NULL,                       /* MenuPtr       */
  190.     NULL                        /* IntuiGfxPtr   */
  191. };
  192.  
  193. struct TextAttr FontStr =
  194. {
  195.     "times.font",               /* Name */
  196.     24,                         /* Y-Size */
  197.     0,
  198.     0
  199. };
  200.